<?php
class TintucsController extends AppController{
	public $name = 'Tintucs';
	public $helpers = array('Html','Form');
	
	public function index(){
		
		$conditionsId = array('Tintuc.Id'=>'(SELECT MAX(Id) FROM tintucs)');
		//$this->set('tintuc',$this->Tintuc->find('all',array('conditions'=>$conditionsId)));
		$this->set('tintuc',$this->Tintuc->query('SELECT * FROM `tintucs` AS `Tintuc` WHERE `Tintuc`.`Id` = (SELECT MAX(Id) FROM tintucs);'));
	}
}
?>